import request from '@/utils/request'

// 登录
export function login(username, password) {
  return request({
    url: '/management/login',
    method: 'post',
    data: {
      username,
      password
    }
  })
}

export function getInfo(token) {
  return request({
    url: '/management/getMemberInfoByToken',
    method: 'get',
    headers:{
      token
    }
  })
}

export function logout() {
  return request({
    url: '/management/logout',
    method: 'post'
  })
}

// 获取菜单权限数据
export function getMenu(token) {
  return request({
    url: '/management/menu',
    method: 'get',
    headers:{
      token
    }
  })

}
